:root {
  --primary-color: #1890ff;
  --text-color: #333;
  --text-secondary: #666;
  --text-disabled: #999;
  --background-color: #f5f5f5;
  --card-background: white;
  --border-radius: 12px;
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nearby-page {
  padding-top: var(--header-height);
  background-color: var(--background-color);
  min-height: 100vh;

  .nearby-content {
    padding:16px 16px 16px; /* 移除顶部padding，因为top-section有自己的padding */
  }

  .top-section {
    position: sticky;
    z-index: 999;
    background-color: var(--background-color);
    padding: 16px 16px 0px 16px;
    margin: -16px -16px 16px -16px; /* 抵消父容器的padding */
    display: flex;
    align-items: center;
    gap: 12px;
    top: 0px;

    .location-selector {
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 8px 12px;
      background: white;
      border-radius: 20px;
      cursor: pointer;

      .location-text {
        font-size: 14px;
        color: var(--text-color);
        font-weight: 500;
      }

      .location-arrow {
        font-size: 12px;
        color: var(--text-secondary);
      }
    }

    .adm-search-bar {
      flex: 1;
    }
  }
  .adm-infinite-scroll{
    padding: 0px !important;
  }

  .merchant-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    
    .loading-container,
    .empty-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 40px 20px;
      text-align: center;
      
      .loading-text,
      .empty-text {
        font-size: 16px;
        color: var(--text-color);
        margin-bottom: 8px;
      }
      
      .empty-tip {
        font-size: 14px;
        color: var(--text-secondary);
      }
    }
    
    .loading-container {
      .loading-text {
        color: var(--primary-color);
      }
    }
    
    .no-results {
      text-align: center;
      color: var(--text-disabled);
      font-size: 14px;
    }

    .loading-text,
    .no-more-text {
      text-align: center;
      padding: 8px;
      color: var(--text-disabled);
      font-size: 14px;
    }

    .merchant-card {
      background: var(--card-background);
      border-radius: var(--border-radius);
      padding: 16px;
      margin-bottom: 12px;
      box-shadow: var(--shadow-light);
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
      transition: all 0.2s ease;

      &:hover {
        box-shadow: var(--shadow-hover);
      }

      &.disabled {
        opacity: 0.8;
        cursor: not-allowed;
        
        &:hover {
          box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        &:active {
          transform: none;
        }
      }

      .merchant-info {
        flex: 1;

        .merchant-name {
          font-size: 16px;
          font-weight: bold;
          color: #333;
          margin-bottom: 8px;
        }

        .merchant-status-row {
          margin-bottom: 8px;

          .status-with-actions {
            display: flex;
            align-items: center;
            gap: 8px;

            .status-badge {
              padding: 4px 8px;
              border-radius: 4px;
              font-size: 12px;
              color: white;

              &.operating {
                background-color: #1890ff;
              }

              &.paused {
                background-color: #999;
              }
            }

            .action-icons {
              display: flex;
              gap: 8px;
              .action-icon {
                width: 26px;
                height: 26px;
                cursor: pointer;
                padding: 2px;
                border-radius: 4px;
                transition: all 0.2s ease;
                &:hover {
                  background-color: rgba(24, 144, 255, 0.1);
                  transform: scale(1.1);
                }
                &:active {
                  transform: scale(0.95);
                }
              }
            }
          }
        }

        .merchant-details {
          .operating-hours {
            font-size: 12px;
            color: #666;
            margin-bottom: 4px;
          }

          .distance-address {
            font-size: 12px;
            color: #666;
            line-height: 1.4;
          }
        }
      }

      .selection-indicator {
        margin-left: 12px;
        display: flex;
        align-items: center;

        .selection-circle {
          width: 20px;
          height: 20px;
          border: 2px solid #ddd;
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;

          &.selected {
            background-color: #1890ff;
            border-color: #1890ff;

            .checkmark {
              color: white;
              font-size: 12px;
              font-weight: bold;
            }
          }
        }
      }
    }
  }

  
}
